const checkSubmit = new Object()
checkSubmit.install = function (Vue) {
  Vue.directive('checkSubmit', {
    // 当被绑定的元素插入到 DOM 中时……
    inserted: function (el) {
      el.addEventListener('click', function () {
        let elements = document.getElementsByClassName('v-validate')
        var evObj = document.createEvent('Event')
        evObj.initEvent('keyup', true, false)
        for (let element of elements) {
          element.dispatchEvent(evObj)
        }
      })
    },
  })
}
export default checkSubmit
